package com.ssm.entity;

import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

public class Student {
    private Integer sId;

    private String sSid;

    private String sName;

    private Integer sGender;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format="yyyy-MM-dd")
    private Date sEnrol;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format="yyyy-MM-dd")
    private Date sGraduate;

    private Integer sStatus;

    private Integer cId;

    private ClassRoom classRoom;

    //一个学生对应多个老师的多对多关系
    private List<Teacher> teachers;

    public Integer getsId() {
        return sId;
    }

    public void setsId(Integer sId) {
        this.sId = sId;
    }

    public String getsSid() {
        return sSid;
    }

    public void setsSid(String sSid) {
        this.sSid = sSid == null ? null : sSid.trim();
    }

    public String getsName() {
        return sName;
    }

    public void setsName(String sName) {
        this.sName = sName == null ? null : sName.trim();
    }

    public Integer getsGender() {
        return sGender;
    }

    public void setsGender(Integer sGender) {
        this.sGender = sGender;
    }

    public Date getsEnrol() {
        return sEnrol;
    }

    public void setsEnrol(Date sEnrol) {
        this.sEnrol = sEnrol;
    }

    public Date getsGraduate() {
        return sGraduate;
    }

    public void setsGraduate(Date sGraduate) {
        this.sGraduate = sGraduate;
    }

    public Integer getsStatus() {
        return sStatus;
    }

    public void setsStatus(Integer sStatus) {
        this.sStatus = sStatus;
    }

    public Integer getcId() {
        return cId;
    }

    public void setcId(Integer cId) {
        this.cId = cId;
    }

    public ClassRoom getClassRoom() {
        return classRoom;
    }

    public void setClassRoom(ClassRoom classRoom) {
        this.classRoom = classRoom;
    }

    public List<Teacher> getTeachers() {
        return teachers;
    }

    public void setTeachers(List<Teacher> teachers) {
        this.teachers = teachers;
    }

    @Override
    public String toString() {
        return "Student{" +
                "sId=" + sId +
                ", sSid='" + sSid + '\'' +
                ", sName='" + sName + '\'' +
                ", sGender=" + sGender +
                ", sEnrol=" + sEnrol +
                ", sGraduate=" + sGraduate +
                ", sStatus=" + sStatus +
                ", classRoom=" + classRoom +
                ", teachers=" + teachers +
                '}';
    }
}